<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>发表文章 {$site_name}</title>
	<meta name="keywords" content=""/>
	<meta name="description" content="">
	<tc_include file="Public:head"/>
	<link rel="stylesheet" href="__ROOT__/public/js/ueditor/themes/default/css/ueditor.css"/>
	<link rel="stylesheet" href="__ROOT__/public/js/artDialog/skins/default.css"/>
</head>
<body class="body-white">
<tc_include file="Public:nav"/>
<div class="container tc-main">
	<div class="row">
		<div class="span9">
			<ul class="nav nav-tabs">
				<li class="active"><a href="#"><i class="fa fa-plus"></i> 发表文章</a></li>
			</ul>
			<div>
				<form class="form-horizontal js-ajax-form" action="{:U('portal/article/edit_post')}" method="post">
					<div class="control-group">
						<label class="control-label" for="input-title">标题</label>
						<div class="controls">
							<input type="text" id="input-title" placeholder="标题" name="post[post_title]" value="{$post.post_title}">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="input-birthday">缩略图</label>
						<div class="controls">
							<div style="display: inline-block;text-align: center;">
								<input type="hidden" name="smeta[thumb]" id="thumb" value="{$smeta.thumb|default=''}">
								<a href="javascript:upload_one_image('图片上传','#thumb');">
									<if condition="empty($smeta['thumb'])">
										<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb-preview" width="135" style="cursor: hand;display: block;margin-bottom: 5px;"/>
										<else/>
										<img src="{:sp_get_asset_upload_path($smeta['thumb'])}" id="thumb-preview" width="135" style="cursor: hand;display: block;margin-bottom: 5px;"/>
									</if>
								</a>
								<input type="button" class="btn btn-small" onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
							</div>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="input-birthday">内容</label>
						<div class="controls">
							<script type="text/plain" id="content" style="width:100%;height:180px;" name="post[post_content]">{$post.post_content}</script>
						</div>
					</div>
					<div class="control-group">
						<div class="controls">
							<input type="hidden" name="post[id]" value="{$post.id}">
							<button type="button" class="btn js-ajax-submit" data-wait="1500">发表</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		<div class="span3">
			<div class="headtitle">
				<h2>分享</h2>
			</div>
			<div class="bdsharebuttonbox">
				<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
				<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
			</div>
			<script>
				window._bd_share_config = {
					"common" : {
						"bdSnsKey" : {},
						"bdText" : "",
						"bdMini" : "2",
						"bdMiniList" : false,
						"bdPic" : "",
						"bdStyle" : "2",
						"bdSize" : "32"
					},
					"share" : {}
				};
				with (document)
					0[(getElementsByTagName('head')[0] || body)
							.appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=86835285.js?cdnversion='
							+ ~(-new Date() / 36e5)];
			</script>
			<div class="headtitle">
				<h2>广告赞助</h2>
			</div>
			<div class="ad">
			</div>
		</div>
	</div>
</div>
<tc_include file="Public:footer"/>
<!-- JavaScript -->
<tc_include file="Public:scripts"/>
<script type="text/javascript" src="__ROOT__/public/js/ueditor/ueditor.frontend.config.js"></script>
<script type="text/javascript" src="__ROOT__/public/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
	var editorURL = GV.WEB_ROOT;
	var editor = new baidu.editor.ui.Editor();
	editor.render("content");
</script>
</body>
</html>